<template>
    <Layout class="layout-container mask-all">
        <Spin fix v-if="loading" size="large"></Spin>
        <Content>
            <Layout class="layout-container">
                <Content>
                    <div style="position: relative;width: 100%;height: 100%;">
                        <iframe v-on:load="load" :src="url" border="0" frameborder="0" style="width: 100%; height: 100%; position: relative;"></iframe>
                    </div>
                </Content>
            </Layout>
        </Content>
    </Layout>
</template>
<script type="text/javascript">
import { Layout, Content, Spin } from 'view-design';

export default {
    name: "SysIframe",
    props: {
        params: Object
    },
    data() {
        return {
            loading: true,
            url: ''
        };
    },
    methods: {

        load() {
            this.loading = false;
        }
        
    },
    mounted() {
        const params = this.params || this.$route.params;
        if(params && params.link) {
            this.url = params.link;
        }
    },
    components: {
        Layout,
        Content,
        Spin
    }
}
</script>